import { MutationTree } from "vuex"

const Mutations: MutationTree<any> = {
  SET_TOKEN(state: any, data: any): void {
    localStorage.token = data.accessToken
    state.token = data.accessToken
    localStorage.refreshToken = data.refreshToken
    state.refreshToken = data.refreshToken
  },
  SET_MEUNS(state: any, menus: any): void {
    state.menus = menus
  },
  SET_LOADING(state: any, loading: boolean): void {
    state.loading = loading
  },
  SET_CURRENTPAGE(state: any, currentPage: any): void {
    state.currentPage = currentPage
  },
}

export default Mutations